#include "LanguageTranslations.h"
#include <sstream>

LanguageTranslations::LanguageTranslations()
{
}

LanguageTranslations::LanguageTranslations(const LanguageRules& source, const LanguageRules& destination) :
source_rule(source),
destination_rule(destination)
{
}

bool operator== (const LanguageTranslations& a, const LanguageTranslations& b)
{
	return (a.source_rule==b.source_rule && a.destination_rule==b.destination_rule);
}

ostream& operator<< (ostream& o, const LanguageTranslations& lt)
{
	return o<<lt.source_rule<<"==>"<<lt.destination_rule<<";";
}

std::string LanguageTranslations::ToString() const
{
    std::stringstream ss;
    ss<<*this;
    return ss.str();
}

void LanguageTranslations::Save(ostream &o) const
{
    this->source_rule.Save(o);
    this->destination_rule.Save(o);
}

void LanguageTranslations::Load(istream &i)
{
    this->source_rule.Load(i);
    this->destination_rule.Load(i);
}
